﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="ItemSearch.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Item.ItemSearch" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
模糊搜索
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <div style="text-align:center;padding:5px 0px 5px 0px">
        <asp:TextBox runat="server" ID="txt_Keywords" Width="400px"></asp:TextBox>
        <asp:Button runat="server" ID="btn_Search" Text="搜索" CssClass="action_btn" 
            onclick="btn_Search_Click" />
    </div>
<fieldset>
        <legend>搜索结果</legend>
        <asp:HiddenField runat="server" ID="hid_KwFormat" Value="<font class='itemsearch_kw'>{0}</font>" />
        <asp:GridView ID="gvItem" runat="server" AutoGenerateColumns="false" CssClass="itemsearch_table"
            DataKeyNames="ItemKey" AllowPaging="True" ShowHeader="false" PageSize="20" PagerSettings-Mode="Numeric"
            OnPageIndexChanging="gvItem_PageIndexChanging">
            <Columns>
                <asp:TemplateField HeaderText="名称">
                    <ItemTemplate>
                        <div class="itemsearch_name">
                            <a href='Admin/Item/List.aspx?cid=<%# DataBinder.Eval(Container, "DataItem.CategoryKey")%>'><%# DataBinder.Eval(Container, "DataItem.CategoryName")%></a>：<a href='Admin/Item/ItemView.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ItemKey")%>'><%# MarkKeywords(DataBinder.Eval(Container, "DataItem.ItemName"))%></a></div>
                        <div class="itemsearch_dt">
                            Last Update:<%# DataBinder.Eval(Container, "DataItem.UpdateDt")%>
                            | By :<%# DataBinder.Eval(Container, "DataItem.OperatorName")%>
                        </div>
                        <div class="itemsearch_tags">
                            Tags: <%# MarkKeywords(DataBinder.Eval(Container, "DataItem.ItemTags"))%>
                        </div>
                        <div class="itemsearch_content">
                            <%# MarkKeywords(DataBinder.Eval(Container, "DataItem.AtlContents"))%>
                        </div>
                        <div class="itemsearch_file">
                            <%# MarkKeywords(DataBinder.Eval(Container, "DataItem.ItemDesc")) %>
                        </div>
                        <div class="itemsearch_file">
                            <%# MarkKeywords(DataBinder.Eval(Container, "DataItem.FileNames"))%>
                        </div>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                共有<asp:Label runat="server" ID="LAB_PAGER_TOTALCOUNT"></asp:Label>条记录
                | <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="First"></asp:LinkButton>
                | <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                <asp:DropDownList runat="server" ID="DDL_PAGER_SELECTOR" OnSelectedIndexChanged="gvPager_OnSelectedIndexChanged" AutoPostBack="true" >
                </asp:DropDownList>
                <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                | <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Last"></asp:LinkButton>
            </PagerTemplate>
            <PagerStyle CssClass="itemsearch_pager" />
            <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
            <EmptyDataTemplate>
                没有可用的数据</EmptyDataTemplate>
        </asp:GridView>
    </fieldset>
    </asp:Content>
